
#import "SLAnimation.h"

CATransition * transition(UIView *view, NSString *type, NSString *subType, CGFloat duration){
	CATransition *trans = [CATransition animation];
	[trans setType:type];
	[trans setSubtype:subType];
	[trans setDuration:duration];
	[trans setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]];
	
	[[view layer] addAnimation:trans forKey:nil];
	
	return trans;
}
